import {get, post ,del, put} from '../http'

// 查询全部科目列表
export const findAllSubject = () =>
  get(`/edu/subject/findAll`)

// 删除科目列表
export const deleteSubject = (id) =>
  del(`/edu/subject/delete/${id}`)

// 创建科目列表
export const createSubject = (data) =>
  post(`/edu/subject/create`, data)

// 修改科目名称
export const updateSubject = (data) =>
  post(`/edu/subject/update`, data)

// 根据二级分类id，查询一级分类id
export const findOneByTwo = (id) =>
  get(`/edu/subject/findOneByTwo/${id}`)

 // 根据id查询
export const findByIdSubject = (id) =>
  get(`/edu/subject/findById/${id}`)